<?php

namespace app\common\model;

use think\Model;

/**
 * 数据模型
 */
class Collection extends Model
{

    const TYPE_CANG = 1;//收藏
    const TYPE_ZAN = 2;//点赞

    const STATUS_NORMAL = 1;//确认
    const STATUS_DISABLE = 2;//取消

    /*
     * 获取状态列表
     * */
    static public function getStatusList($type = 2, $value = 1)
    {
        $data = [
            self::STATUS_NORMAL => '确认',
            self::STATUS_DISABLE => '取消',
        ];
        if ($type == 1) {
            return $data[$value] ?? '';
        } else {
            return $data;
        }
    }

    /*
      * 获取类型列表
      * */
    static public function getTypeList($type = 2, $value = 1)
    {
        $data = [
            self::TYPE_CANG => '收藏',
            self::TYPE_ZAN => '点赞',
        ];
        if ($type == 1) {
            return $data[$value] ?? '';
        } else {
            return $data;
        }
    }


}
